﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WebApplication1.bll;

namespace WebApplication1.dao
{
    public class conexaoinsequipamentos:Iequipamentos
    {
        public int insercaoequipamentos(int id, string nomeequip)
        {
            String conexString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["wallet"].ConnectionString;
            System.Data.SqlClient.SqlConnection conexao = new System.Data.SqlClient.SqlConnection(conexString);
            System.Data.SqlClient.SqlCommand comando = new System.Data.SqlClient.SqlCommand();
            comando.Connection = conexao;
            comando.CommandType = System.Data.CommandType.Text;
            comando.CommandText = "insert into equipamentos (id,nomeequip,kwh,metrocubico,media_util_equip,cons_med_equip,dias_util_mes)values (1,'batedeira',20,10,10,20,10)')";
            conexao.Open();
            int resultado=comando.ExecuteNonQuery();
            conexao.Close();
            return resultado;




        }








        public int insercaoequipamentos(string resultado)
        {
            throw new NotImplementedException();
        }
    }
}